package com.hbqyml.system.service.impl;

import com.hbqyml.system.domain.HbRegion;
import com.hbqyml.system.domain.vo.HbRegionVo;
import com.hbqyml.system.mapper.HbRegionMapper;
import com.hbqyml.system.service.IHbRegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 地区Service业务层处理
 * 
 * @author houyutong
 * @date 2022-03-25
 */
@Service
public class HbRegionServiceImpl implements IHbRegionService 
{
    @Autowired
    private HbRegionMapper hbRegionMapper;

    /**
     * 查询地区
     * 
     * @param regionId 地区主键
     * @return 地区
     */
    @Override
    public HbRegion selectHbRegionByRegionId(Integer regionId)
    {
        return hbRegionMapper.selectHbRegionByRegionId(regionId);
    }

    /**
     * 查询地区列表
     * 
     * @param hbRegion 地区
     * @return 地区
     */
    @Override
    public List<HbRegion> selectHbRegionList(HbRegion hbRegion)
    {
        return hbRegionMapper.selectHbRegionList(hbRegion);
    }

    /**
     * 新增地区
     * 
     * @param hbRegion 地区
     * @return 结果
     */
    @Override
    public int insertHbRegion(HbRegion hbRegion)
    {
        return hbRegionMapper.insertHbRegion(hbRegion);
    }

    /**
     * 修改地区
     * 
     * @param hbRegion 地区
     * @return 结果
     */
    @Override
    public int updateHbRegion(HbRegion hbRegion)
    {
        return hbRegionMapper.updateHbRegion(hbRegion);
    }

    /**
     * 批量删除地区
     * 
     * @param regionIds 需要删除的地区主键
     * @return 结果
     */
    @Override
    public int deleteHbRegionByRegionIds(Integer[] regionIds)
    {
        return hbRegionMapper.deleteHbRegionByRegionIds(regionIds);
    }

    /**
     * 删除地区信息
     * 
     * @param regionId 地区主键
     * @return 结果
     */
    @Override
    public int deleteHbRegionByRegionId(Integer regionId)
    {
        return hbRegionMapper.deleteHbRegionByRegionId(regionId);
    }

    /**
     * 获取地区信息
     * @param regionId
     * @return
     */
    @Override
    public List<HbRegionVo> getAListOfRegions(Integer regionId) {
        return hbRegionMapper.getAListOfRegions(regionId);
    }
}
